

export let RegexUtil={
    mobile(mobile){
        let regex=/^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
        return regex.test(mobile)
    },
    chName(name){
        let regex=/^[\u4e00-\u9fa5]{2,4}$/
        return regex.test(name)
    },
    email(email){
        let regex=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
        return regex.test(email)
    },
    idCard(card){
        let regex=/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
        return regex.test(card)
    }

}